package com.example.carinformantion;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.carinformantion.act.BatteryActivity;
import com.example.carinformantion.act.ChelunActivity;
import com.example.carinformantion.act.ChenshenActivity;
import com.example.carinformantion.act.DianchiActivity;
import com.example.carinformantion.act.Diandongji;
import com.example.carinformantion.act.DipanActivity;
import com.example.carinformantion.utils.TokenUtil;

import java.util.concurrent.atomic.AtomicReference;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        new Thread(()->{
            try {
                System.out.println(TokenUtil.getToken());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }).start();

    }

    public void startBatteryAct(View view) {
        startActivity(new Intent(this, BatteryActivity.class));
    }

    public void startDiandongji(View view) {
        startActivity(new Intent(this, Diandongji.class));
    }

    public void startDianchi(View view) {
        startActivity(new Intent(this, DianchiActivity.class));
    }

    public void startChenshen(View view) {
        startActivity(new Intent(this, ChenshenActivity.class));
    }

    public void startDipan(View view) {
        startActivity(new Intent(this, DipanActivity.class));
    }

    public void startChelun(View view) {
        startActivity(new Intent(this, ChelunActivity.class));
    }
}